<!-- <style scoped src="./index.scss" lang="scss" rel="stylesheet/scss"></style> -->
<template src="./index.html"></template>
<script>
import Edit from "./../listEdit/index";
export default {
    mixins: [Vue.prototype.$vFN.Mixins.Base, Vue.prototype.$vFN.Mixins.List],
    components: {},
    data() {
        return {
            mixinPage_vueName: "dict_list",
            // 页面接口地址
            apiUrl: {
                list: "mall-admin/dict-data/list",
                delete: "mall-admin/dict-data/delete",
            },
            // 表格查询数据
            mixinList_tableSearchData: {
                dictType: "",
            },
            // 表格数据
            tableData: [],
            // 表格数据删除展示结构
            tableDeleteConfig: {
                columns: [
                    {
                        label: "数据标签",
                        prop: "dictLabel",
                        type: "",
                    },

                    {
                        label: "数据数值",
                        prop: "dictValue",
                        type: "",
                    },
                    {
                        label: "状态",
                        prop: "status",
                        type: "state-icon",
                        options: {
                            success: 0,
                            error: 1,
                        },
                    },
                    
                    {
                        label: "默认",
                        prop: "isDefault",
                        type: "state-icon",
                        options: {
                            success: 1,
                            error: 0,
                        },
                    },
                    
                    {
                        label: "备注信息",
                        prop: "remark",
                        type: "",
                    },
                ],

                // title: "确定停用以下内容么?",
            },
            boxVisible: false,
        };
    },
    methods: {
        // 初始化
        async init() {
            // 显示窗口
            this.boxVisible = true;
            // 刷新表格数据，此方法扩展时可重写
            await this.mixinList_refreshData();
        },
        // 打开添加/修改
        editBoxOpen(params_) {
            Edit.init({
                mixinEdit_parent: this,
                mixinEdit_editType: params_.type,
                form: {
                    dictType: this.mixinList_tableSearchData.dictType,
                },
                id: params_.id,
            });
        },

        // 提交成功
        onSubmitSuccess() {
            this.onSuccess();
        },
        // 成功回调
        onSuccess() {},
        // 取消回调
        onCancel() {},
        // 失败回调
        onError() {},
    },
    mounted() {
        this.init();
    },
    activated() {},
};
</script>